<div fxLayout="row" fxLayoutAlign="center center">
  <nz-tabset
    nzSize="small"
    [nzTabPosition]="tabPosition"
    fxFlex.xs="100"
    fxFlex.sm="95"
    fxFlex.md="90"
    fxFlex.lg="82"
    fxFlex.xl="76"
  >
    <nz-tab nzTitle="Start">
      <ng-template nz-tab>
        <h2>Start</h2>
        <p>
          Start with buying mining drones and technicians, buy mines and power
          plant when needed. If you run out of energy all drones will stop! so
          make sure you have enough energy.
          <br />
          Scientist will unlock researches.
        </p>
        <h3>
          <a href="https://discord.gg/cGbsVgj" target="_blank">
            <i nz-icon nzType="fa-b:discord" class="link-icon"></i>
            Discord
          </a>

          <a href="https://github.com/scorzy/IdleSpace2" target="_blank">
            <i nz-icon nzType="github" nzTheme="outline" class="link-icon"></i>
            Github
          </a>
        </h3>
        <h2>Getting started</h2>
        <ol>
          <li>Buy mining drones, technicians, mines and power plants.</li>
          <li>Buy scientist and research Metallurgist.</li>
          <li>Buy metallurgists and workers.</li>
          <li>
            Click <i nz-icon nzType="my:strafe"></i> Fleets, click Reinforce.
          </li>
          <li>
            Wait for ships to be constructed, buy more workers in case is too
            slow.
          </li>
          <li>
            Click <i nz-icon nzType="fa-s:crosshairs"></i> Battle, click Attack
            All.
          </li>
          <li>
            Click <i nz-icon nzType="setting"></i> Options to setup auto attack
            options, set "Min ships %" to 90, so Fleet 1 will attack when 90% or
            more drones are ready.
          </li>
          <li>
            Activate everything under "Automation". "Battle win" notification
            can be disabled from
            <i nz-icon nzType="setting"></i> Options -> ui.
          </li>
          <li>
            After defeating the first tree enemies you will need to search them
            by your own. To do so research "Search" from laboratory screen and
            than buy searchers. Note that searchers consume science.
          </li>
          <!-- <li>
            Click <i nz-icon nzType="fa-s:search"></i> Enemies, click Search.
            Activate "Auto search" on <i nz-icon nzType="sync"></i> Automation.
          </li> -->
          <li>
            Automation unlock when you defeat an enemy of level
            {{ AUTOMATION_UNLOCKED_LEVEL }}.
          </li>
        </ol>
        <h2>Next goals</h2>
        <ul>
          <li>
            Research
            <i nz-icon nzType="my:vintage-robot"></i>
            Robotics as fast as you can. It unlock replicators, a drone that
            will help making new drones, including itself.
          </li>
          <li>Research new ships and modules, improve ships designs.</li>
          <li>
            To increase battle speed equip thrusters (travel eta is from the
            slowest ship) and/or activate more fleets to fight more tiles at the
            same time.
          </li>
          <li>
            Defeat higher level enemies, every time you beat any max level enemy
            from level two, you will gain Experience. You don't get Experience
            from defeating the same level more times in the same sun.
          </li>
        </ul>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Science">
      <ng-template nz-tab>
        <h2>Laboratory</h2>
        <p>
          Research is generated by scientists. Researches in the "In Progress"
          column are researched, those in the "Backlog" are not.
          <br />
          Some researches, like "Origin" are exclusive, you can get only one per
          run.
          <br />
          Some researches can be "boosted" by doing task like "build one mine"
          or "build one mine". Boost increase research progress by
          {{ INSPIRATION_PERCENT | percent }}, research must be unlocked and can
          be boosted only one time per level. See the rising arrow in the
          research preview.
        </p>
        <h2>Technologies</h2>
        <p>
          Science can be used for researches or technologies, in the Laboratory
          tab you can set the priority. Technologies determine the maximum
          module level for space ships. Technologies give the following bonus:
        </p>
        <ul>
          <li>
            Increase research speed of researches with the relative technology
          </li>
          <li>
            Increase drone mods, each drone depends on different technologies,
            see mod page.
          </li>
          <li>
            <strong>Military Engineering</strong> increase ships build speed
          </li>
          <li>
            <strong>Civil Engineering</strong> increase space stations and
            megatructures build speed
          </li>
          <li><strong>Computing</strong> increase computing/s</li>
          <li><strong>Robotics</strong> increase the drone mods</li>
          <li><strong>Naval</strong> increase naval capacity</li>
          <li><strong>Search</strong> increase searching speed</li>
        </ul>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Warfare">
      <ng-template nz-tab>
        <h2>Warfare</h2>
        <p>
          In order to acquire new district you will need to win battles. On the
          Fleet section you can change your fleet composition. On the Design tab
          you can create new Ships design or change existing designs. Enemies
          can be searched on the Enemies section.
        </p>
        <h3>Fleets</h3>
        <p>
          You can have up to five fleets with different composition, one fleet
          can have up to
          {{ FLEET_CAPACITY | format }} naval capacity. There aren't penalties
          for using more fleets. Ships naval capacity are equal to the maximum
          number of module levels.
        </p>
        <h3>Battle</h3>
        <p>
          Battle time is determined by enemy distance of your slowest ship.
          <br />
          Battle results can be analysed on the "Reports" section. Battle
          consist on five rounds, on each round:
        </p>
        <ul>
          <li>
            Ships fire in orderly fashion, having anti-shield before anti-armour
            ship is recommended.
          </li>
          <li>
            Each weapon fire to one semi random target, including ships dead in
            this round. "Threat" is the chance to be chosen, some modules
            increase the threat of some ships. "Accuracy" increase threat of
            alive ships, "Adaptive Precision" increase threat proportional to
            weapon armour %, shield % and defence %.
          </li>
          <li>
            Attacher gain threat based on damage done, "Threat multi" can
            increase or decrease that amount. Threat is added at the end of the
            round.
          </li>
          <li>
            In case target has no shield and armour is lower than explosion
            threshold there is a chance to explode. Chance is proportional to
            missing armour and occur on each shot, if conditions are met. In
            case exploded ship has "Explosion damage", damage is dealt to
            attackers. Explosion damage is 100% armour and 100% shield.
          </li>
          <li>
            At the end of each round dead ships are removed and will not be
            target in the next round. Ships gain threat based on damage done or
            "Threat per round".
          </li>
          <li>
            Shield are regenerated, if some ships have "Shield Recharge".
            "Shield Recharge" apply to any ships with shield greater than zero,
            ships with lower shield percent have priority. If a ships has shield
            completely depleted shield will not be regenerated.
          </li>
        </ul>
        <h3>Ground Defences</h3>
        <p>
          Enemies may have ground defences, planetary defences works exactly
          like ships but can be completely destroyed by Nuke. Ground defences
          don't require energy because are attached to the planet energy grid.
          <br />
          After level 50 enemies will have anti missiles, one anti missiles
          completely block one nuke.
        </p>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Designs">
      <ng-template nz-tab>
        <h2>Designs</h2>
        <p>
          On the "Design" section you can create or update ship designs. Each
          ship can equip a maximum number of modules and module points. larger
          modules cost more points and have a small bonus compared to more small
          modules.
        </p>
        <ul>
          <li>
            <strong>Armour</strong>
            is the ship health. Ships have some base armour.
          </li>
          <li>
            <strong>Armour%</strong>
            increase armour by a percent.
          </li>
          <li>
            <strong>Armour Damage Reduction</strong>
            decrease all incoming armour damage by a fixed quantity.
          </li>
          <li>
            <strong>Shield</strong>
            is depleted before Armour. It prevents ship explosion, that is based
            on armour, so is more valuable but require energy. Shield can be
            recharged. <strong>Shield%</strong> and
            <strong>Shield Damage Reduction</strong> work in the same way of
            armour.
          </li>
          <li>
            <strong>Energy</strong> must be greater or equal to zero. Has no
            other effects.
          </li>
          <li>
            <strong>Damage</strong> damage, percent dealt to armour, shield or
            ground defence may vary.
          </li>
          <li>
            <strong>Price</strong> amount of work needed to build one ships.
          </li>
          <li>
            <strong>Explosion</strong> explosion threshold, when armour is less
            than Explosion the ships may explode. In case of lethal damage
            explosion is not triggered.
          </li>
          <li>
            <strong>Explosion Damage</strong> damage done to attacker in case of
            explosion.
          </li>
          <li><strong>Threat</strong> starting threat.</li>
          <li>
            <strong>Threat /round</strong> extra threat per round, useful for
            "Tank" ships.
          </li>
          <li><strong>Precision</strong> increase threat of alive targets.</li>
          <li>
            <strong>Adaptive Precision</strong> increase threat of alive targets
            based on weapon armour% and shield%.
          </li>
          <li>
            <strong>Velocity</strong> and <strong>Acceleration</strong> with
            "Enemy distance" determine battle time.
          </li>
          <li>
            <strong>Cargo</strong> and <strong>Science</strong> increase
            material and science battle rewards.
          </li>
        </ul>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Search">
      <ng-template nz-tab>
        <h2>Search</h2>
        <p>
          You can search for new enemies in the "Search" section. You can search
          enemies of any level, but you can only attack enemies with level lower
          or equal to your max level. You can improve enemies rewards by paying
          more "search" or by increasing enemy distance.
          <br />
          On each run, defeat max level enemy, grants Experience points.
        </p>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Automation">
      <ng-template nz-tab>
        <h2>Automation</h2>
        <p>
          <li>
            Automation unlock when you defeat an enemy of level
            {{ AUTOMATION_UNLOCKED_LEVEL }}.
          </li>
          Some features of the game can be automated. On
          <i nz-icon nzType="sync"></i> "Automation" section automation can be
          enabled or disabled. This include drones auto buy automations. Doesn't
          include drones assembly with components, auto fight, auto nuke, and
          auto reinforce.
        </p>
        <h3>Drones</h3>
        <p>
          Drone auto buy can be configured on each drone card. There are two
          automations for drones: auto buy with resources and assembly with
          components. Those options are completely unrelated.
        </p>
        <h3>Drones - Comp. priorities</h3>
        <p>
          This is the options for components. There are two priorities, the
          first is used by default, the second is used when the product of that
          drone are ending. The second should be way higher n order to prevent
          blackout. Below you can see how many components are reserved for that
          drone.
        </p>
        <h3>Drones - Auto Buy</h3>
        <p>
          This automation buy drones with resources, you can set max buy and
          interval.
          <br />
          "Total buy" is the maximum quantity you want to be bought when you
          have at least one replicator. The price increase exponentially, so at
          some point buying drones are not worth it.
          <br />
          On each update cycle automations are executed from higher priority to
          low. Usually you can ignore this.
          <br />
          <strong>Auto Buy doesn't work in this cases:</strong>
        </p>
        <ul>
          <li>
            <strong
              >Production of any resources consumed by this drone are less than
              1/s:</strong
            >
            this prevent some blackout.
          </li>
          <li>
            <strong>Drone is not 100% operative:</strong>
            There is no reason to buy, increase operativity instead.
          </li>
          <li>
            <strong
              >Manual buy is greater than "Total buy" and there are
              replicators:</strong
            >
          </li>
        </ul>
        <h3>Drones - Auto Modding</h3>
        <p>
          On the modding screen, whe auto mod is active, you can set up auto
          modding. Auto modding doesn't consider existing mods, allocated mods
          will be overwritten. Mods are rounded floor, a few mods may be not
          allocated.
          <br />
          Negative priorities are calculated in proportion to total positive
          priorities, if you want any mod to be as low as possible, regardless
          of positive mods, put -10000.
          <br />
          By default auto mod execute each time the new configuration differ
          from the actual configuration, in practice every time you gains new
          mods. To prevent unwanted modding increase "Min. components %" or the
          automation interval.
        </p>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Components">
      <ng-template nz-tab>
        <h2>Components</h2>
        <p>
          Components are used to make drones, see "Automation" info. Components
          storage is used only when all drones are at maximum quantity, before
          that components are reserved. On drone's pages you can see how many
          components are reserved and how many are needed to make one drone.
        </p>
        <h2>Components and Drone modding</h2>
        <p>
          When your technology are high enough, you will be able to improve your
          drones. When modding, all drones except for one will be destroyed. The
          maximum amount of mods depends on drone type and ca be increased with
          drone's technology (es. Mining for miners), robotics technology and
          researches. Hover "Total:" on mod page to see details.
        </p>
        <h3>Recycling</h3>
        <p>
          Recycling increase component recovery from drones, recycling can be
          increased from mod or researches. Whenever you mod a drone you will
          get back an amount of components equal to "actual recycling" * "drone
          quantity". Those components are used immediately to rebuild this
          specific drones and are not affected by components storage.
        </p>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Mega Engineering">
      <ng-template nz-tab>
        <h2>Space station</h2>
        <p>
          "Shipyard work" can be used to build space stations and mega
          structures. On the "Space stations" section you can change the
          priority of Space stations and army ships. Space stations grants
          habitable space.
        </p>
        <h2>Mega structures</h2>
        <p>Not implemented yet.</p>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Computing / buffs">
      <ng-template nz-tab>
        <h2>Computing</h2>
        <p>
          Computing research line and some special research will unlock buffs on
          bottom of screen.<br />
          The Computing research line will unlock automation; priority two or
          three are fired when previous priority buffs are active. <br />
          After researching "Computing IV" priority one can be fired on full
          computing.
        </p>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Prestige">
      <ng-template nz-tab>
        <h3>Prestige</h3>
        <p>
          Prestige reset everything except experience, dark matter, cards, and
          ships designs. Prestige unlocks cards and dark matter.
          <br />
          After prestige you can defeat enemies again to gain more experience.
          <br />
          Prestige grants "experience multiplier" based on max current max level
          enemy. "experience multiplier" increase the effectiveness of
          experience, retroactively.
        </p>
        <h3>Cards</h3>
        <p>
          Cards are special bonus unlocked every ten enemy level, cards are
          unlocked by prestige and never reset. Cards are not effected by
          "experience multiplier" and can be changed only one time per prestige
          run. Some cards require more slots.
        </p>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Challenges">
      <ng-template nz-tab>
        <h3>Challenges</h3>
        <p>
          Challenges can be accessed through the Prestige page. The first
          challenge unlock when you defeat enemy level 150.
          <br />
          Starting a challenge will perform a prestige and reset the Experience
          Multiplier. Experience Multiplier reset even if you have the "Prestige
          multi doesn't decrease" card. During a challenge you can prestige and
          increase the exp. multiplier as normally.
          <br />
          Challenges can be completed several times. Each time you complete a
          challenge the win condition increase by 100.
        </p>
      </ng-template>
    </nz-tab>
    <nz-tab nzTitle="Credits">
      <ng-template nz-tab>
        <h2>Credits</h2>
        <p>
          This game is built with Angular 2+ and Ng-Zorro (Ant design). See
          <a href="https://github.com/scorzy/IdleSpace2" target="_blank">
            Github
          </a>
          for source code and package used.
          <br />
          Icons are from Ng-Zorro, https://game-icons.net and Font Awesome.
          <br />
          This game is inspired by various idle and strategy games, including
          but not limited to: Trimps, Ngu Idle, Realm grinder, Stellaris,
          Civilization.
        </p>
        <a href="https://scorzy.github.io/IdleSpace/about.html" target="_blank">
          <i nz-icon nzType="fa-b:paypal" class="link-icon"></i>
          Donate <small>https://scorzy.github.io/IdleSpace/about.html</small>
        </a>
      </ng-template>
    </nz-tab>
  </nz-tabset>
</div>
